<template>
  <div class="mask" v-if="isShow" @click="close">
    <div class="mask_icon" @click="close">
      <i class="el-icon-circle-close-outline"></i>
    </div>
    <div class="mask_box">
      <img :src="qiniuUrl+imgKey" alt="" style="max-width: 100%" height="600px" @click.stop="">
    </div>
  </div>
</template>

<script>
  import { QINIU_URL } from '@/utils/config'
  export default {
    props: {
      imgKey: {
        type: String,
        default: ''
      },
      isShow: {
        type: Boolean,
        default: false
      }
    },
    data() {
      return {
        qiniuUrl: QINIU_URL
      }
    },
    methods: {
      close() {
        this.$emit('close')
      }
    }
  }
</script>

<style scoped>
  .mask {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    text-align:center;
  }
  .mask_icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 50px;
    color: #fff;
  }
  .mask_box {
    min-width: 100px;
    min-height: 100px;
    display:inline-block;
    margin-top: 100px;
  }
</style>
